MultiDictionary Constructor (Boolean)

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Create a new MultiDictionary. The default ordering of keys and values are used. If duplicate values are allowed, multiple copies of the same value can be associated with the same key. For example, the key "foo" could have "a", "a", and "b" associated with it. If duplicate values are not allowed, only one copies of a given value can be associated with the same key, although different keys can have the same value. For example, the key "foo" could have "a" and "b" associated with it, which key "bar" has values "b" and "c" associated with it.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public MultiDictionary(
	bool allowDuplicateValues
)
Visual Basic (Declaration)
Public Sub New ( _
	allowDuplicateValues As Boolean _
)
Visual C++
public:
MultiDictionary (
	bool allowDuplicateValues
)

Parameters

allowDuplicateValues
Boolean
Can the same value be associated with a key multiple times?

Remarks

The default ordering of keys and values will be used, as defined by TKey and TValue's implementation of IComparable<T> (or IComparable if IComparable<T> is not implemented). If a different ordering should be used, other constructors allow a custom Comparer or IComparer to be passed to changed the ordering.

Exceptions

ExceptionCondition
System..::InvalidOperationExceptionTKey or TValue does not implement either IComparable<T> or IComparable.

See Also